fig <- gapminder %>%
      plot_ly(x = ~gdpPercap, y = ~lifeExp, size = ~pop,
              text = ~country, hoverinfo="text") %>%
      layout(xaxis = list(type = "log")) %>%
      add_markers(color = ~continent, frame = ~year)
fig